package com.prjsystem.service.impl;

import com.prjsystem.common.constant.CMSConstant;
import com.prjsystem.dao.CommonDao;
import com.prjsystem.dao.HomeViewDao;
import com.prjsystem.entity.HomeBean;
import com.prjsystem.service.HomeService;

public class HomeServiceImpl implements HomeService{
	private HomeViewDao homeViewDao;
	private CommonDao commonDao;
	private HomeBean homeBean = new HomeBean();
	
	//init
	@Override
	public HomeBean searchAllInfo(HomeBean homeBean) {
		homeBean.setWrInfo(homeViewDao.searchwrInfo());
		homeBean.setDwInfo(homeViewDao.searchdwInfo());
		homeBean.setNewsInfoList(homeViewDao.searchNewsInfo());
		return homeBean;
	}
	
	@Override
	public HomeBean searchNewsList(HomeBean homeBean) {
		homeBean.setSelectListBean(commonDao.dropDowmList(CMSConstant.NEWS_DP_TYPE_DETAIL_LIST));
		return homeBean;
	}
	public CommonDao getCommonDao() {
		return commonDao;
	}
	public void setCommonDao(CommonDao commonDao) {
		this.commonDao = commonDao;
	}
	public HomeViewDao getHomeViewDao() {
		return homeViewDao;
	}
	public void setHomeViewDao(HomeViewDao homeViewDao) {
		this.homeViewDao = homeViewDao;
	}

	public void setHomeBean(HomeBean homeBean) {
		this.homeBean = homeBean;
	}

	public HomeBean getHomeBean() {
		return homeBean;
	}
}
